package com.insurance.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;
import java.util.Date;

import com.insurance.common.enums.StateEnum;
import lombok.Data;

/**
 * 合作方角色
 * 
 * @date 2021-02-27 15:51:21
 */
@Data
@TableName("partner_role")
public class PartnerRoleEntity implements Serializable {

	private static final long serialVersionUID = 1L;

	/**
	 * $column.comments
	 */
	@TableId
	private String roleId;
	/**
	 * $column.comments
	 */
	private String roleName;
	/**
	 * $column.comments
	 */
	private String roleCode;
	/**
	 * $column.comments
	 */
	private String updatePersonId;
	/**
	 * $column.comments
	 */
	private String updatePersonName;
	/**
	 * $column.comments
	 */
	private Date updateTime;
	/**
	 * $column.comments
	 */
	private String state;
	/**
	 * $column.comments
	 */
	private String deleteFlag;

	@TableField(exist=false)
	private String roleIdText;

	@TableField(exist=false)
	private String stateText;

	@TableField(exist=false)
	private boolean roleChecked = false;

	public String getRoleIdText() {
		return this.roleId != null ? String.valueOf(this.roleId) : "";
	}

	public String getStateText() {
		return StateEnum.getMessage(this.state);
	}
}
